toNotEmptyMap

open fun <K, V> Map<K, V>.toNotEmptyMap(): NotEmptyMap<K, V>

Returns a NotEmptyMap containing all the entries of this map, or throws an IllegalArgumentException if this map is empty.